package com.icongyou.enterprise.talent_analysis.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 学生数据更新事件
 * 当学生提交作业、获得成绩、收到评价时触发
 */
@Getter
public class StudentDataUpdateEvent extends ApplicationEvent {
    
    private final String studentId;
    private final UpdateType updateType;
    private final String relatedId; // 相关ID(如submissionId, gradeId等)
    
    public StudentDataUpdateEvent(Object source, String studentId, UpdateType updateType, String relatedId) {
        super(source);
        this.studentId = studentId;
        this.updateType = updateType;
        this.relatedId = relatedId;
    }
    
    /**
     * 数据更新类型
     */
    public enum UpdateType {
        SUBMISSION,      // 新提交
        GRADE,          // 新成绩
        COMMENT,        // 新评价
        TEAM_ACTIVITY   // 团队活动
    }
}
